package com.chuqiyun.authorization.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 管理员账号(Sysuser)表实体类
 *
 * @author mryunqi
 * @since 2023-04-14 17:36:10
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "SysUser")
@Data
public class Sysuser extends Model<Sysuser> {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //用户名
    private String username;
    //密码
    private String password;
    //电话
    private String phone;
    //姓名
    private String name;
    //邮箱
    private String email;
    //权限组
    private Integer permission;
    //上次登录时间
    private Long loginDate;



    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    }

